app.controller("indexController",function ($scope,indexService) {
    
    $scope.loginName= "";//默认为空

    $scope.getLoginName=function () {

        indexService.getLoginName().then(function(result){

            $scope.loginName= result.data.name;

        });

    }

        

});